package com.czl.base.data.source

import com.czl.base.base.BaseBean
import com.czl.base.data.bean.*
import io.reactivex.Observable
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.Path
import retrofit2.http.Query

/**
 * @author Alwyn
 * @Date 2020/7/22
 * @Description
 */
interface HttpDataSource {
    fun loginByPwd(paramsJson: String): Observable<BaseBean<LoginUser>>
    fun loginByPhoneCode(paramsJson: String): Observable<BaseBean<LoginUser>>
    fun getPhoneCode(phone: String): Observable<BaseBean<Any?>>
    fun takeRepair(params: Map<String, String>): Observable<BaseBean<Any?>>
    fun turnRepair(params: Map<String, String>): Observable<BaseBean<Any?>>
    fun queryWorkOrderType(pType: String,areaNo: String): Observable<BaseBean<List<OrderTypeBean>>>
    fun getMonthPrice(vehicleNo: String, areaId: String): Observable<BaseBean<Float>>
    fun parkCharging(vehicleNo: String): Observable<BaseBean<PayDetail>>
    fun retrievePassword(phone: String, code: String, pwd: String): Observable<BaseBean<Any?>>
    fun getMyCarList(
        vehiclesWithNoPlan: Boolean,
        areaId: String
    ): Observable<BaseBean<List<CarItem>>>

    fun deleteCarList(vehicleNos: List<String>, areaId: String): Observable<BaseBean<Any?>>
    fun deleteQueryCar(vehicleNo: String, areaId: String): Observable<BaseBean<Any?>>
    fun getMyQueryHistory(): Observable<BaseBean<List<CarItem>>>
    fun logout(): Observable<BaseBean<Any?>>
    fun getHotLine(areaId: String): Observable<BaseBean<String>>
    fun getDeleteNotice(): Observable<BaseBean<String>>
    fun verifyPwdNet(
        newPassword: String,
        oldPassword: String
    ): Observable<BaseBean<Any?>>

    fun initPassword(
        newPassword: String
    ): Observable<BaseBean<Any?>>

    fun deleteUserAccount(): Observable<BaseBean<Any?>>
    fun addPersonCar(params: Map<String, String>): Observable<BaseBean<Any?>>
    fun getUserRooms(phone: String, areaId: String): Observable<BaseBean<List<RoomBean>>>
    fun getUsersByDeptId(
        areaNo: String,
        companyId: String,
        deptId: String
    ): Observable<BaseBean<List<UserBean>>>

    fun register(username: String, password: String, repassword: String): Observable<BaseBean<Any?>>
    fun getRecordDetail(orderNo: String): Observable<BaseBean<RecordDetailBean>>
    fun queryPayResult(orderNo: String, areaId: String): Observable<BaseBean<PayResultBean>>
    fun getMonthCardList(
        pageNum: Int,
        pageSize: Int,
        areaId: String
    ): Observable<BaseBean<MonthCardListBean>>

    fun getNoticeMsgList(
        params: Map<String, String>
    ): Observable<BaseBean<NoticeMsgListBean>>

    fun readNotice(msgId: String): Observable<BaseBean<Any?>>

    fun evaluateOrder(params: Map<String, String>): Observable<BaseBean<Any?>>
    fun getRepairList(
        params: Map<String, String>
    ): Observable<BaseBean<RepairListBean>>
    fun getReportList(
        params: Map<String, String>
    ): Observable<BaseBean<RepairListBean>>

    fun getComplaintList(params:Map<String,String>):Observable<BaseBean<RepairListBean>>
    fun getPayRecordList(
        params: Map<String, String>
    ): Observable<BaseBean<PayRecordListBean>>

    fun placeAnOrder(
        params: Map<String, String>
    ): Observable<BaseBean<PayInfoBean>>

    fun payWorkOrder(
        params: Map<String, String>
    ): Observable<BaseBean<WorkOrderPayBean>>

    fun getActivityList(
        params: Map<String, String>
    ): Observable<BaseBean<ActivityListBean>>
    fun getNoticeList(
        params: Map<String, String>
    ): Observable<BaseBean<NoticeListBean>>

    fun workOrderReady(
        pageNum: Int,
        pageSize: Int,
        type: String
    ): Observable<BaseBean<WorkOrderBean>>

    fun workOrderExec(
        pageNum: Int,
        pageSize: Int,
        type: String
    ): Observable<BaseBean<WorkOrderBean>>

    fun workOrderFinish(
        pageNum: Int,
        pageSize: Int,
        type: String
    ): Observable<BaseBean<WorkOrderBean>>

    fun orderOperate(
        orderId: String
    ): Observable<BaseBean<List<OrderOperate>>>

    fun getScoreList(
        params: Map<String, String>
    ): Observable<BaseBean<ScoreListBean>>



    fun replyEvaluate(
        params: Map<String, String>
    ): Observable<BaseBean<Boolean>>


    fun workOrderAccept(
        userId: String,
        userName: String,
        member: MutableList<MembersBean>,
        note: String,
        orderId: String,
        serviceTime: String
    ): Observable<BaseBean<Any>>

    fun checkTaskRegister(
        checkTaskDetailId: String,
        handleState: String,
        standardList: List<PatrolOrderDetailBean.StandardList>
    ): Observable<BaseBean<Any>>

    fun alarmTaskRegister(
        handleImage: String,
        handleInfo: String,
        orderId: String
    ): Observable<BaseBean<Any>>


    fun inspectTaskFinishOrder(
        orderId: String
    ): Observable<BaseBean<Any>>

    fun checkTaskFinishOrder(
        orderId: String
    ): Observable<BaseBean<Any>>

    fun alarmTaskFinishOrder(
        orderId: String
    ): Observable<BaseBean<Any>>

    fun workOrderTransfer(
        userId: String,
        userName: String,
        note: String,
        orderId: String,
    ): Observable<BaseBean<Any>>

    fun checkTaskCheck(
        note: String,
        orderId: List<String>,
        isOk: Boolean
    ): Observable<BaseBean<Any>>

    fun takeCareOrderAuditConfirm(
        pageNum: Int,
        pageSize: Int,
        filter: String
    ): Observable<BaseBean<TakeCareDispatchBean>>

    fun checkTaskAuditConfirm(
        pageNum: Int,
        pageSize: Int,
    ): Observable<BaseBean<PatrolBean>>

    fun checkTaskAuditUnConfirm(
        pageNum: Int,
        pageSize: Int,
    ): Observable<BaseBean<PatrolBean>>


    fun takeCareOrderAuditUnConfirm(
        pageNum: Int,
        pageSize: Int,
        filter: String
    ): Observable<BaseBean<TakeCareDispatchBean>>

    fun takeCareOrderReady(
        pageNum: Int,
        pageSize: Int,
        filter: TakeCarePageParams.Data
    ): Observable<BaseBean<TakeCareBean>>

    fun assign(
        note: String,
        orderId: String,
        userId: String,
        username: String
    ): Observable<BaseBean<Any>>

    fun patrolOrderDispatchReady(
        pageNum: Int,
        pageSize: Int,
    ): Observable<BaseBean<PatrolBean>>

    fun patrolOrderDispatchFinish(
        pageNum: Int,
        pageSize: Int,
    ): Observable<BaseBean<PatrolBean>>

    fun patrolOrderExec(
        pageNum: Int,
        pageSize: Int,
    ): Observable<BaseBean<PatrolBean>>

    fun patrolOrderReady(
        pageNum: Int,
        pageSize: Int,
    ): Observable<BaseBean<PatrolBean>>

    fun patrolOrderFinish(
        pageNum: Int,
        pageSize: Int,
    ): Observable<BaseBean<PatrolBean>>

    fun patrolRecordOrder(
        search: String,
        pageNum: Int,
        pageSize: Int,
    ): Observable<BaseBean<PatrolBean>>

    fun takeCareOrderRecord(
        pageNum: Int,
        pageSize: Int,
        filter: String
    ): Observable<BaseBean<TakeCareRecordBean>>

    fun takeCareOrderScanRecord(
        pageNum: Int,
        pageSize: Int,
        filter: String
    ): Observable<BaseBean<TakeCareRecordBean>>

    fun inspectTaskCheck(
        note: String,
        orderId: List<String>,
        isOk: Boolean
    ): Observable<BaseBean<Any>>

    fun assignBatch(
        note: String,
        orderId: List<String>,
        userId: String,
        username: String
    ): Observable<BaseBean<Any>>

    fun takeCareOrderDispatchFinish(
        pageNum: Int,
        pageSize: Int,
        filter: String
    ): Observable<BaseBean<TakeCareDispatchBean>>

    fun takeCareOrderDispatchReady(
        pageNum: Int,
        pageSize: Int,
        filter: String
    ): Observable<BaseBean<TakeCareDispatchBean>>

    fun takeCareOrderExec(
        pageNum: Int,
        pageSize: Int,
        filter: TakeCarePageParams.Data
    ): Observable<BaseBean<TakeCareBean>>

    fun takeCareOrderFinish(
        pageNum: Int,
        pageSize: Int,
        filter: TakeCarePageParams.Data
    ): Observable<BaseBean<TakeCareBean>>

    fun inspectTaskRegister(
        handleImage: String,
        handleState: String,
        inspectTaskDetailIdList: List<String>,
    ): Observable<BaseBean<Any>>



    fun getFullOrder(orderId: String): Observable<BaseBean<WorkOrderDetailBean>>
    fun uploadImg(imgSrc: String): Observable<BaseBean<ImgRspBean>>

    fun listUser(areaId: String): Observable<BaseBean<List<MembersBean>>>
    fun getHandleUser(orderTypeId: String): Observable<BaseBean<List<MembersBean>>>


    fun getVersionName(): Observable<BaseBean<Any?>>
    fun getUserInfoNet(): Observable<BaseBean<UserInfo>>
    fun uploadHeadImg(imgSrc: String): Observable<BaseBean<ImgRspBean>>
    fun uploadHeadImg(bucketName:String,imgSrc: String,folderName:String): Observable<BaseBean<ImgRspBean>>
    fun changeUserInfo(params: Map<String, String>): Observable<BaseBean<Any?>>
    fun submitReport(sub:SubmitReportRequestBean):Observable<BaseBean<Any>>
    fun getOrderDetail(no:String):Observable<BaseBean<OrderDetailBean>>
    fun getUserDetailInfo():Observable<UserInfoBean>
    fun handleWorkOrder(rb:HandleWorkerRequestBean):Observable<BaseBean<Any>>
    fun isManager(id:Int):Observable<BaseBean<Boolean>>
    fun cancelWorkOrder(no: String): Observable<BaseBean<Any?>>
    fun deleteWorkOrder(no: String): Observable<BaseBean<Any?>>
    fun checkOrder(request:CheckOrderRequestBean):Observable<BaseBean<Any?>>
    fun workOrderToday(): Observable<BaseBean<Map<String, Int>>>
    fun workOrderPercent(type: Int): Observable<BaseBean<List<PercentBean>>>
    fun workOrderTime(): Observable<BaseBean<List<WorkOrderTimeBean>>>
    fun getTakeCareFullOrder(orderId: String): Observable<BaseBean<WorkOrderDetailBean>>
    fun getAlarmFullOrder(orderId: String): Observable<BaseBean<AlarmOrderDetailBean>>
    fun getPatrolFullOrder(orderId: String): Observable<BaseBean<PatrolOrderDetailBean>>
    fun getComplaintDetail(no: String):Observable<BaseBean<ComplaintDetailBean>>
    fun takeComplaint(params: Map<String, String>):Observable<BaseBean<Any>>
    fun handleComplaint(params: Map<String, String>):Observable<BaseBean<Any>>
    fun turnComplaint(params: Map<String, String>):Observable<BaseBean<Any>>
    fun getActivityDetail(id:String):Observable<BaseBean<ActivityDetailBean>>
    fun getPersonListForActivity(activityId:String):Observable<BaseBean<ActivityPersonListBean>>
    fun getBulletinDetail(id:Int):Observable<BaseBean<BulletinDetailBean>>
    fun getDeptList(companyId:String):Observable<BaseBean<List<ComplaintDeptBean>>>
    fun getCarAccessList(areaId: String):Observable<BaseBean<List<CarAceessItemBean>>>
    fun carAccessAction(params: Map<String, String>):Observable<BaseBean<Any?>>
}